/*
 *  CDisplay.h
 *  TestRPG
 *
 *  Created by Michael Rhodes on 10-05-30.
 *  Copyright 2010 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef CDISPLAY_H
#define CDISPLAY_H

class CDisplay : public CSingleton <CDisplay> 
{
public:
	CDisplay();
	~CDisplay();
	
	// Setup and shutdown the OpenGL display
	int InitDisplay(int width, int height, int bits, bool fs, wchar_t* title);
	int InitGL(void);
	int ShutdownDisplay(void);

	void Flip(void);
	
	// Called when main window is resized
	void ResizeGLScene(GLuint width, GLuint height);

	// Window Procedure for processing Windows messages
	static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
	
private:
	HWND		m_hMainWnd;		// Handle to the main window
	HGLRC		m_hRC;			// OpenGL rendering context
	HDC			m_hDC;			// Windows Device Context
	HINSTANCE	m_hInstance;	// Instance handle for Windows
	
	// Screen attributes
	GLuint		m_ScreenWidth;			
	GLuint		m_ScreenHeight;
	GLuint		m_ScreenBpp;
	GLboolean	m_bFullscreen;	
};

#endif